package com.itheima.ClassTest;

import java.util.Scanner;

public class SubString {
    public static void main(String[] args) {
        //截取字符串
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入手机号");
        String telnum = sc.nextLine();
        //前三位,从0索引开始,不包含3索引;含头不含尾
        String s =telnum.substring(0,3);
        //后四位
        String s1 = telnum.substring(telnum.length()-4);
        System.out.println(s+"****"+s1);
    }
}
